// part1:C10:ex10.7b.cpp
// use fill_n function to set zero of int type vector.
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(int argc, char *argv[]) {
  vector<int> v;
  v.reserve(10);
  fill_n(back_inserter(v), 10, 0);
  
  for (auto iter = v.begin(); iter != v.end(); iter++) {
    cout << *iter << " "; 
  }
  cout << endl;

  return 0;
}
